package com.jcl.recruit.resume.dao;

import com.jcl.core.db.DatabaseContext;
import com.jcl.recruit.resume.mapper.ResumeJobIntentionMapper;
import com.jcl.recruit.resume.model.ResumeJobIntention;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;


@Component
public class ResumeJobIntentionDao implements ResumeJobIntentionMapper {

    @Autowired
    ResumeJobIntentionMapper resumeJobIntentionMapper;

    @Override
    public List<ResumeJobIntention> findListByResumeIds(String corpCode, List<Integer> resumeIds) {
        DatabaseContext.setCurrentContext();
        return resumeJobIntentionMapper.findListByResumeIds(corpCode, resumeIds);
    }

    @Override
    public Map<String, Object> findOneMap(String corpCode, Integer resumeId) {
        DatabaseContext.setCurrentContext();
        return resumeJobIntentionMapper.findOneMap(corpCode, resumeId);
    }

    @Override
    public ResumeJobIntention findOne(String corpCode, Integer resumeId) {
        DatabaseContext.setCurrentContext();
        return resumeJobIntentionMapper.findOne(corpCode, resumeId);
    }

    @Override
    public int add(ResumeJobIntention entity) {
        DatabaseContext.setCurrentContext();
        return resumeJobIntentionMapper.add(entity);
    }

    @Override
    public int batchDeleteByResumeIds(String corpCode, List<Integer> resumeIds) {
        DatabaseContext.setCurrentContext();
        return resumeJobIntentionMapper.batchDeleteByResumeIds(corpCode, resumeIds);
    }
}
